<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改controller列')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-url-edit" th:object="${apiUrl}">
            <input name="urlId" th:field="*{urlId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">controller id：</label>
                <div class="col-sm-8">
                    <input name="controllerId" th:field="*{controllerId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">url：</label>
                <div class="col-sm-8">
                    <input name="requestUrl" th:field="*{requestUrl}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">方法名：</label>
                <div class="col-sm-8">
                    <input name="methodName" th:field="*{methodName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">方法类型：</label>
                <div class="col-sm-8">
                    <select name="methodType" class="form-control m-b" required>
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">请求方式：</label>
                <div class="col-sm-8">
                    <select name="methodContentType" class="form-control m-b" required>
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">请求参数，json：</label>
                <div class="col-sm-8">
                    <input name="requestParamMap" th:field="*{requestParamMap}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">返回对象class：</label>
                <div class="col-sm-8">
                    <input name="returnParamClass" th:field="*{returnParamClass}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">返回参数，json：</label>
                <div class="col-sm-8">
                    <input name="returnParamMap" th:field="*{returnParamMap}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">0-禁用 1-启用：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="urlStatus" value="" required>
                        <label th:for="urlStatus" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">符合规范，不规范等：</label>
                <div class="col-sm-8">
                    <input name="urlLabel" th:field="*{urlLabel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">描述：</label>
                <div class="col-sm-8">
                    <input name="methodDesc" th:field="*{methodDesc}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/url";
        $("#form-url-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-url-edit').serialize());
            }
        }
    </script>
</body>
</html>